package com.hai.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 登录日志表
 * </p>
 *
 * @author NieChangan
 * @since 2022-05-21
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("tb_login_log")
public class LoginLog extends Model<LoginLog> {

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户名
     */
    @TableField("username")
    private String username;

    /**
     * 登录时间
     */
    @TableField("login_time")
    private LocalDateTime loginTime;

    /**
     * 登录地点
     */
    @TableField("location")
    private String location;

    /**
     * IP地址
     */
    @TableField("ip")
    private String ip;

    /**
     * 操作系统
     */
    @TableField("user_system")
    private String userSystem;

    /**
     * 浏览器
     */
    @TableField("user_browser")
    private String userBrowser;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
